<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>01-post和get方法</title>
		<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				$(".btn_get").click(function(){
					$.get("http://47.107.100.125:8080/api/home/getAgreement",
					function(data){
						console.log(data);
					})
				});
				$(".btn_post").click(function(){
					$.post("http://47.107.100.125:8080/api/home/getAgreement",
						function(data){
							console.log(data);
						}
					)
				});
				$(".btn_ajax").click(function(){
					$.ajax({
						url:"http://47.107.100.125:8080/api/home/getAgreement",
						type:"get",
						success:function(data){
							console.log(data);
						}
					});
				});
			})
		</script>
	</head>
	<body>
		<button class="btn_get">发送一个HTTP GET 请求并获取返回结果</button>
		<button class="btn_post">发送一个HTTP POS 请求并获取返回结果</button>
		<button class="btn_ajax">发送一个HTTP ajax 请求并获取返回结果</button>
	</body>
</html>
